return surface;
}
+/* TODO: Remove once we have proper transient window support. */
+static gboolean
+should_render_in_parent (GdkWindow *window)
+{
+ GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
+
+ return impl->transient_for && gdk_window_get_window_type (window) != GDK_WINDOW_TOPLEVEL;
+}
+
static void
ensure_surface_full (GdkWindow *window,
MirBufferUsage buffer_usage)
MirEventDelegate event_delegate = { event_cb, NULL };
GdkMirWindowReference *window_ref;
- if (impl->surface)
+ if (impl->surface || should_render_in_parent (window))
return;
/* no destroy notify -- we must leak for now
gdk_window_invalidate_rect (GDK_MIR_WINDOW_IMPL (window->impl)->transient_for, &r, FALSE);
}
-/* TODO: Remove once we have proper transient window support. */
-static gboolean
-should_render_in_parent (GdkWindow *window)
-{
- GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
-
- return impl->transient_for && gdk_window_get_window_type (window) != GDK_WINDOW_TOPLEVEL;
-}
-
static void
send_buffer (GdkWindow *window)
{